Optimal. Leaf size=47 \[ \frac {1}{2} a (B+2 C) x+\frac {a (B+C) \sin (c+d x)}{d}+\frac {a B \cos (c+d x) \sin (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {4157, 4081,
3872, 2717, 8} \begin {gather*} \frac {a (B+C) \sin (c+d x)}{d}+\frac {a B \sin (c+d x) \cos (c+d x)}{2 d}+\frac {1}{2} a x (B+2 C) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2717
Rule 3872
Rule 4081
Rule 4157
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \cos ^2(c+d x) (a+a \sec (c+d x)) (B+C \sec (c+d x)) \, dx\\ &=\frac {a B \cos (c+d x) \sin (c+d x)}{2 d}-\frac {1}{2} \int \cos (c+d x) (-2 a (B+C)-a (B+2 C) \sec (c+d x)) \, dx\\ &=\frac {a B \cos (c+d x) \sin (c+d x)}{2 d}+(a (B+C)) \int \cos (c+d x) \, dx+\frac {1}{2} (a (B+2 C)) \int 1 \, dx\\ &=\frac {1}{2} a (B+2 C) x+\frac {a (B+C) \sin (c+d x)}{d}+\frac {a B \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 44, normalized size = 0.94 \begin {gather*} \frac {a (2 B c+2 B d x+4 C d x+4 (B+C) \sin (c+d x)+B \sin (2 (c+d x)))}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.77, size = 57, normalized size = 1.21
method | result | size |
risch | \(\frac {a B x}{2}+a x C +\frac {\sin \left (d x +c \right ) B a}{d}+\frac {\sin \left (d x +c \right ) a C}{d}+\frac {B a \sin \left (2 d x +2 c \right )}{4 d}\) | \(51\) |
derivativedivides | \(\frac {B a \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B a \sin \left (d x +c \right )+a C \sin \left (d x +c \right )+a C \left (d x +c \right )}{d}\) | \(57\) |
default | \(\frac {B a \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B a \sin \left (d x +c \right )+a C \sin \left (d x +c \right )+a C \left (d x +c \right )}{d}\) | \(57\) |
norman | \(\frac {\frac {a \left (B +2 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a \left (3 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a \left (B +2 C \right ) x}{2}-\frac {2 B a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 B a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a \left (B +C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a \left (B +2 C \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-a \left (B +2 C \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a \left (B +2 C \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {a \left (B +2 C \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {a \left (B +2 C \right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}\) | \(240\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 55, normalized size = 1.17 \begin {gather*} \frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a + 4 \, {\left (d x + c\right )} C a + 4 \, B a \sin \left (d x + c\right ) + 4 \, C a \sin \left (d x + c\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.99, size = 38, normalized size = 0.81 \begin {gather*} \frac {{\left (B + 2 \, C\right )} a d x + {\left (B a \cos \left (d x + c\right ) + 2 \, {\left (B + C\right )} a\right )} \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int B \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 93 vs.
\(2 (43) = 86\).
time = 0.47, size = 93, normalized size = 1.98 \begin {gather*} \frac {{\left (B a + 2 \, C a\right )} {\left (d x + c\right )} + \frac {2 \, {\left (B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.83, size = 50, normalized size = 1.06 \begin {gather*} \frac {B\,a\,x}{2}+C\,a\,x+\frac {B\,a\,\sin \left (c+d\,x\right )}{d}+\frac {C\,a\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________